<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>练习</title>
    <style>
        #l2{
            background-color:pink
        }
        .c1{color:green}
        li,a{background-color: blue}
        a{color:green}
        a:hover{color: yellow}
        a:visited{color: blue}
        a:active{color: yellow}
        input[type='text']{
            color: red;
        }
        /**/
        input[type='password']{
            background-color: green;
        }
        div div p{
            color:green;
        }
        body>div>div>p{
            background-color: red;
        }

    </style>
</head>
<body>
<div id="l2">刘备</div>
<div>关羽</div>
<div class="c1">张飞</div>
<p>悟空</p>
<p>八戒</p>
<p class="c1">沙僧</p>
<ul>
    <li>水煮鱼</li>
    <li>红烧肉</li>
    <li class="c1">黄焖鸡</li>
</ul>
<input type="text"><input type="password">
<div>
    <p>P1</p>
    <div><p>P2</p></div>
    <div>
        <p>P3</p>
        <div><p>P4</p></div>
    </div>
</div>
<a href="http://www.baidu.com">百度</a>
</body>
</html>